﻿using System;
using System.Web.Mvc;
using AutoMapper;
using WebApp.ModelService;
using WebApp.Services;

namespace WebApp.Controllers
{
    public class FolderController : SmartController
    {
        private readonly IFolderModelService _folderModelService;
        public FolderController(IUserSession userSession, IMappingEngine mappingEngine, IFolderModelService folderModelService)
            : base(userSession, mappingEngine)
        {
            _folderModelService = folderModelService;
        }

        // GET: /Case/
        public ActionResult Index()
        {
            var response = _folderModelService.GetPageBySpecification();
            return View(response);
        }

        public ViewResult Show(Guid id)
        {
            var response = _folderModelService.GetFolderDetailById(id);
            return View(response);
        }

        public ViewResult Edit(Guid id)
        {
            var response = _folderModelService.GetFolderDetailById(id);
            return View(response);
        }
        public ActionResult Add()
        {
            var response = _folderModelService.GetFolderDetailById();
            return View(response);
        }
    }
}